#include "SaPopCalls.h" SaCallbackStruct* SaMakeCbsStartColRange(SaCallbackStruct *cbs, int start, int number);
cbs
is used as the starting column, and to designate from which to make the return SaCallbackStruct callback structure.cbs
are used as the stopping or last column from which to make the return SaCallbackStruct.cbs
is NULL or if the column specification is invalid.SaMakeCbsStartColRange
returns a malloc'd SaCallbackStruct
given a callback structure. The start parameter specifies which columns of the first group of cbs
is used as the starting column from which to make the return SaCallbackStruct
. The number parameter specifies how many columns of cbs
are used to make the return SaCallbackStruct
. The number
argument must be greater than 0 or strange results will occur. The start parameter is limited to 0 and the number of columns in the first group of cbs
is - 1. If the range of columns specified by start
and number
does not fall into the range of 0 to the number of columns in the first group of cbs - 1, then the column specification is invalid.
If cbs
is NULL, or an invalid column specification is used, a NULL pointer is returned. Use SaFreeCbs()
to deallocate this memory when it is no longer needed. The returned structure should be considered read-only data. Also, the actual data values in the structure should only be used while the underlying data is valid. This is usually after the Population callback function returns, although it may extend beyond that if the data is cached and not overwritten.
#include "SaConsoleCalls.h" void SaPopulateFields(list, client_data, cbs) Widget list; XtPointer client_data; SaCallbackStruct *cbs; { SaCallbackStruct *pcbs; pcbs = SaMakeCbsStartStopCol(cbs, 0, 5); SaPopulateTextFieldByCol(UxGetWidget(textField3),0,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField4),1,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField6),2,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField5),3,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField8),4,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField7),5,pcbs); SaFreeCbs(pcbs); pcbs = SaMakeCbsByCol(cbs, 2); SaPopulateTitleAndIcon(UxGetWidget(topLevelShell1), NULL,pcbs); SaFreeCbs(pcbs); pcbs = SaMakeCbsByGroup(cbs, 0); SaPopulateList(UxGetWidget(scrolledList1), NULL, pcbs); SaFreeCbs(pcbs); pcbs = SaMakeCbsStartColRange(cbs, 6, 1); SaPopulateTextField(UxGetWidget(textField7), NULL,pcbs); SaFreeCbs(pcbs); }